package openbang.account.service.vo;

/**
 * 业务定义 : 
 * 本系统涉及到的业务模块定义
 * 应用场合：
 * 1、功能菜单
 * 2、权限分配
 * 3、业务日志记录的分类
 * 
 * 注：注册会员是一个业务，注册会员的过程，作为操作类型。
 *     一般的查询，不在这里定义。
 * 
 * @author aibo zeng
 *
 */

public enum BusinessEnum {
	REGISTER (10,"注册会员"),
	VERIFY_EMAIL (11,"验证邮箱"),
	VERIFY_MOBILE (12,"验证手机"),
	FIND_PWD(20,"找回密码"),
	SEND_MSG(30,"发消息"),
	UPLOAD_FACEPHOTO(40,"上传头像"),
	DISPLAY_PHOTO(50,"显示图片");

	private Integer code;
	private String desc;
	
	private BusinessEnum(Integer code,String desc) {
		this.code = code;
		this.desc = desc;
	}
	public int getCode() {
		return code;
	}
	public String getDesc(){
		return desc;
	}
	
	public static String getDesc(Integer code) {
		for(BusinessEnum each : BusinessEnum.values()) {
			if(each.getCode()==code)
				return each.getDesc();
		}		
		return "";
	}
}
